package com.avic.rong.activity.product.api;

import com.avic.rong.api.HttpPostService;
import com.example.minato.minastore.BaseApi;
import com.example.minato.minastore.listener.HttpOnNextListener;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import io.reactivex.Observable;
import retrofit2.Retrofit;

/**
 * Creater: Created by wangyz on 2018/12/12.
 * Email: 936804097@qq.com
 */
public class UserCommentApi extends BaseApi<UserCommentApi> {

    private Integer pageNo = 1;
    private Integer commentType;
    private Integer idValue;

    public void setArgument(Integer commentType, Integer idValue){
        this.idValue = idValue;
        this.commentType = commentType;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo = pageNo;
    }

    public void setCommentType(Integer commentType) {
        this.commentType = commentType;
    }

    public void setIdValue(Integer idValue) {
        this.idValue = idValue;
    }

    public UserCommentApi(RxAppCompatActivity rxAppCompatActivity, HttpOnNextListener listener) {
        super(rxAppCompatActivity, listener);
    }

    @Override
    public Observable getObservable(Retrofit retrofit) {
        HttpPostService postService = retrofit.create(HttpPostService.class);
        return postService.userCommentList(idValue,commentType,pageNo);
    }

}
